From 30cea8cba051b8cdb9dd4a073bb744f0daace24a Mon Sep 17 00:00:00 2001
From: Alex Suykov <alex.suykov@gmail.com>
Date: Tue, 30 Dec 2014 23:24:08 +0200
Subject: [PATCH 2/7] mips: syscall()

---
 libcompat/syscall.S | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/libcompat/syscall.S b/libcompat/syscall.S
index 5743000..3884329 100644
--- a/libcompat/syscall.S
+++ b/libcompat/syscall.S
@@ -129,6 +129,20 @@ syscall:
 	mr   %r8,%r9
 	b    __unified_syscall
 
+#elif defined(__mips__)
+	move	$2, $4
+	move	$4, $5
+	move	$5, $6
+	move	$6, $7
+	lw	$7, 16($29)
+	lw	$25, 20($29)
+	sw	$25, 16($29)
+	lw	$25, 24($29)
+	sw	$25, 20($29)
+	syscall
+	la	$25, __unified_syscall
+	jr	$25
+
 #else
 #include <endian.h>
 	.section	.comment
-- 
2.0.3

